.trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
}

.trigger:hover {
  color: #1890ff;
}

/* 自定义卡片悬浮效果 */
.ant-card-hoverable:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

/* Monaco Editor 容器样式 */
.monaco-editor-container {
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  overflow: hidden;
}

/* 顶部导航栏样式 */
.desktop-menu {
  display: flex;
  align-items: center;
  height: 100%;
}

.mobile-menu-trigger {
  display: none !important;
}

/* 水平菜单项样式调整 */
.ant-menu-horizontal {
  line-height: 64px !important;
  height: 64px !important;
  border-bottom: none !important;
}

.ant-menu-horizontal > .ant-menu-item {
  height: 64px !important;
  line-height: 64px !important;
  border-bottom: 2px solid transparent !important;
  margin: 0 8px !important;
  top: 0 !important;
  position: relative !important;
}

.ant-menu-horizontal > .ant-menu-item:hover {
  border-bottom-color: #1890ff !important;
  color: #1890ff !important;
  background: transparent !important;
}

.ant-menu-horizontal > .ant-menu-item-selected {
  border-bottom-color: #1890ff !important;
  color: #1890ff !important;
  background: transparent !important;
}

/* 移除 Ant Design 默认的下划线 */
.ant-menu-horizontal::after {
  display: none !important;
}

.ant-menu-horizontal .ant-menu-item::after {
  display: none !important;
}

.ant-menu-horizontal .ant-menu-item-selected::after {
  display: none !important;
}

/* 确保没有额外的边框和阴影 */
.ant-menu-horizontal .ant-menu-item {
  border: none !important;
  box-shadow: none !important;
}

.ant-menu-horizontal .ant-menu-item-selected {
  border: none !important;
  box-shadow: none !important;
  border-bottom: 2px solid #1890ff !important;
}

.ant-menu-horizontal .ant-menu-item:hover {
  border: none !important;
  box-shadow: none !important;
  border-bottom: 2px solid #1890ff !important;
}

/* Logo区域样式 */
.ant-layout-header .ant-typography h5 {
  color: #1890ff !important;
  margin: 0 !important;
  font-weight: 600 !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .desktop-menu {
    display: none !important;
  }

  .mobile-menu-trigger {
    display: inline-flex !important;
  }

  /* 移动端时调整布局 */
  .ant-layout-header > div:first-child {
    justify-content: space-between !important;
  }

  /* 移动端Logo区域调整 */
  .ant-layout-header > div:first-child > div:first-child {
    min-width: auto !important;
    margin-right: 16px !important;
  }

  /* 移动端用户信息区域调整 */
  .ant-layout-header > div:last-child {
    min-width: auto !important;
  }
}

@media (max-width: 480px) {
  .ant-layout-header {
    padding: 0 16px !important;
  }

  .ant-layout-content {
    padding: 16px !important;
  }

  /* 超小屏幕下隐藏版本号 */
  .ant-layout-header .ant-typography span {
    display: none !important;
  }
}

/* 确保固定定位的 Header 不被其他元素覆盖 */
.ant-layout-header {
  z-index: 1000 !important;
}

/* 抽屉菜单样式优化 */
.ant-drawer-body .ant-menu {
  border-right: none;
}

.ant-drawer-body .ant-menu-item {
  margin: 0;
  height: 48px;
  line-height: 48px;
}

.ant-drawer-body .ant-menu-item:hover {
  background-color: #f0f9ff;
  color: #1890ff;
}

.ant-drawer-body .ant-menu-item-selected {
  background-color: #e6f7ff;
  color: #1890ff;
}

/* 用户信息区域样式 */
.ant-layout-header .ant-dropdown-trigger {
  height: 40px;
  display: flex;
  align-items: center;
}

/* 模板编辑器相关样式 */
.template-editor .ant-tabs-nav {
  margin-bottom: 0;
  padding: 0 10px;
}

.template-editor .ant-card-body {
  padding: 12px;
}

.template-editor .ant-form-item {
  margin-bottom: 12px;
}

.template-editor .editor-header {
  background-color: #ffffff;
}

.template-editor .video-preview {
  border-radius: 4px;
  overflow: hidden;
  background-image: url("");
  background-repeat: repeat;
}

.template-editor .ant-tree-node-content-wrapper {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.template-editor .timeline-controls .ant-slider-rail {
  background-color: #e1e1e1;
}

.template-editor .timeline-controls .ant-slider-track {
  background-color: #1890ff;
}

/* 响应式调整 */
@media (max-width: 1200px) {
  .template-editor .right-panel,
  .template-editor .left-panel {
    width: 220px;
  }
}

@media (max-width: 992px) {
  .template-editor {
    flex-direction: column;
  }

  .template-editor .left-panel,
  .template-editor .center-panel,
  .template-editor .right-panel {
    width: 100%;
    border: none;
    border-bottom: 1px solid #f0f0f0;
  }

  .template-editor .center-panel {
    order: 1;
    min-height: 300px;
  }

  .template-editor .left-panel {
    order: 2;
    max-height: 300px;
  }

  .template-editor .right-panel {
    order: 3;
  }
}
